/**
 * 
 */
package com.google.code.sip.ucenter.model;

import com.google.code.morphia.annotations.Entity;
import com.google.code.morphia.annotations.Indexed;
import com.google.code.morphia.annotations.Reference;

/**
 * 好友分组实体类
 * 
 * @author Liuye
 * 
 */
@Entity(noClassnameStored = true)
@SuppressWarnings("serial")
public class FriendGroup extends BaseEntity {
	public static final String DEFAULT_FRIEND_GROUP_NAME = "默认组";
	/**
	 * 用户
	 */
	@Reference
	private User user;

	/**
	 * 组名
	 */
	@Indexed
	private String name;

	/**
	 * 描述
	 */
	private String description;

	/**
	 * 显示顺序
	 */
	@Indexed()
	private Integer displayOrder;
	/**
	 * 是否缺省好友组
	 * 
	 * @return
	 */
	private boolean defaulted = false;

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	public boolean isDefaulted() {
		return defaulted;
	}

	public void setDefaulted(boolean defaulted) {
		this.defaulted = defaulted;
	}

	public int getDisplayOrder() {
		return displayOrder;
	}

	public void setDisplayOrder(int displayOrder) {
		this.displayOrder = displayOrder;
	}
}
